package cn.jxau.bean.po;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
@TableName("t_article")
@KeySequence("t_sequence_article")
public class Article implements Serializable{
	private static final long serialVersionUID = 1L;
	@TableId(type=IdType.INPUT)
	private Long id;//主键
	private Long authorID;//作者ID
	private String title;//文章标题
	private Long typeID;//z文章类型ID
	private String imageUrl; //图片地址
	private String introduction;//文章介绍
	@JsonFormat(pattern="yyyy-MM-dd hh:mm:ss")
	private Date tdate=new Date();//发布文章时间
	private String path;//路径
	private Boolean exist=Boolean.TRUE;//是否存在,默认为1，存在
	private Boolean draft=Boolean.FALSE;//是否为草稿，默认为是  暂时修改为false
	private Boolean qualified=Boolean.FALSE;//是否通过审核，默认为false 暂时修改为true
	@TableField(exist=false)
	private User authorInfo; //作者信息
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getAuthorID() {
		return authorID;
	}
	public void setAuthorID(Long authorID) {
		this.authorID = authorID;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Long getTypeID() {
		return typeID;
	}
	public void setTypeID(Long typeID) {
		this.typeID = typeID;
	}
	public String getImageUrl() {
		return imageUrl;
	}
	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public Date getTdate() {
		return tdate;
	}
	public void setTdate(Date tdate) {
		this.tdate = tdate;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public Boolean getExist() {
		return exist;
	}
	public void setExist(Boolean exist) {
		this.exist = exist;
	}
	public Boolean getDraft() {
		return draft;
	}
	public void setDraft(Boolean draft) {
		this.draft = draft;
	}
	public Boolean getQualified() {
		return qualified;
	}
	public void setQualified(Boolean qualified) {
		this.qualified = qualified;
	}
	public User getAuthorInfo() {
		return authorInfo;
	}
	public void setAuthorInfo(User authorInfo) {
		this.authorInfo = authorInfo;
	}
	@Override
	public String toString() {
		return "Article [id=" + id + ", authorID=" + authorID + ", title=" + title + ", typeID=" + typeID
				+ ", imageUrl=" + imageUrl + ", introduction=" + introduction + ", tdate=" + tdate + ", path=" + path
				+ ", exist=" + exist + ", draft=" + draft + ", qualified=" + qualified + ", authorInfo=" + authorInfo
				+ "]";
	}
	public Article(Long id, Long authorID, String title, Long typeID, String imageUrl, String introduction, Date tdate,
			String path, Boolean exist, Boolean draft, Boolean qualified, User authorInfo) {
		super();
		this.id = id;
		this.authorID = authorID;
		this.title = title;
		this.typeID = typeID;
		this.imageUrl = imageUrl;
		this.introduction = introduction;
		this.tdate = tdate;
		this.path = path;
		this.exist = exist;
		this.draft = draft;
		this.qualified = qualified;
		this.authorInfo = authorInfo;
	}
	public Article() {
		super();
	}
	
	
}
